home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!panix!usenet
- From: gugu@panix.com (Dae Choi)
- Newsgroups: comp.lang.c++
- Subject: Re: Help with derived class of ifstream class
- Date: 8 Mar 1996 19:58:25 GMT
- Organization: PANIX Public Access Internet and Unix, NYC
- Message-ID: <486.6641T879T944@panix.com>
- References: <4hob5n$65c@daily-planet.nodak.edu>
- NNTP-Posting-Host: gugu.dialup.access.net
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
-
- Hi,
-
- >#include <iostream.h>
-
- Perhaps you forgot to add:
-
- #include <iomanip.h>
-
- >#include <fstream.h>
- >class X:public ifstream{
- >public:
- > int read();
- > X(char *s):ifstream(s){;};
- >};
-
- >int X::read(){
- > int i;
- > (*this) >> i; // this is ok
- > (*this) >> hex >> i; // compiler does not like this
- ^^^
- >};
-
- >The error I get is
- > no match for 'operator >>(class X, enum ios::{anonymous})
-
- Hope this helps :^)
-
- Dae,
- gugu@panix.com
-
-